#ifndef SYN_SUBCONTROLLITEM_H
#define SYN_SUBCONTROLLITEM_H

#include <iconButton.h>
#include <subControllItem.h>


namespace View {

  class SynSubControllItem;

  class SynAttackButton : public IconButton
  {
    bool buttonType;
    SynSubControllItem *synControll;
  public:
  SynAttackButton(GooCanvasItem * newParent,
		  gdouble x,gdouble y,
		  GdkPixbuf *bg,GdkPixbuf *mg,GdkPixbuf *fg,
		  bool newButtonType,SynSubControllItem *newSynControll)
    :IconButton(newParent,x,y,bg,mg,fg),
      buttonType(newButtonType),
      synControll(newSynControll)
      {}
    virtual bool OnClicked();
  };

  class SynSubControllItem : public SubControllItem
  {
    GtkWidget *targetIpEntry;
    GtkWidget *targetPortEntry;
    GtkWidget *srcIpEntry;
    
    //these goo objects are created for change language
    GooCanvasItem *pleaseInputSynMessages;
    GooCanvasItem *targetIpLabel;
    GooCanvasItem *targetPortLabel;
    GooCanvasItem *srcIpLabel;

    SynAttackButton *startAttackButton;
    SynAttackButton *stopAttackButton;

  public:
    SynSubControllItem(GooCanvasItem *parent);
    ~SynSubControllItem();
    
    virtual int OnReceive(Controller::Broadcast *broadcast);
    virtual bool SendAllAddress();
    virtual bool CheckInputData();
  };

}

#endif
